
$(document).ready(function () {
    $(".vn").attr("onmouseout", "hideRight(event)");
    $(".vb").attr("onmouseout", "hideRight(event)");
    setVerNar();
    $(".class_info_mid_text").mouseenter(function () {
        $(this).children("p").css("display", "block");
    });
    $(".class_info_mid_text").mouseleave(function () {
        $(this).children("p").css("display", "none");
    });
});

function showRight(liIndex) {
    $(".vb").css("display", "none");
    $(".vb").removeClass("show_block");
    var id = "#vb_" + liIndex;
    var vnid = "#vn_" + liIndex;
    $(id).css("display", "block");
    $(id).addClass("show_block");
    $(".vn").removeClass("vertical_nar_item_hover");
    $(vnid).addClass("vertical_nar_item_hover");
    $(vnid).css("color", "#2b669a");

}
function hideRight(event) {
    var div = document.getElementById("test");
    var x = event.clientX;
    var y = event.clientY;
    var divx1 = $(".show_block").offset().left;
    var divy1 = $(".show_block").offset().top;
    var divx2 = divx1 + $(".show_block").width();
    var divy2 = divy1 + $(".show_block").height();
    if (x < divx1 || x > divx2 || y < divy1 || y > divy2) {
        $(".vb").css("display", "none");
        $(".vn").css("color", "#fff");
        $(".vn").removeClass("vertical_nar_item_hover");
    }
}
